CREATE TABLE WorkHoursLogs
(
	Id INT NOT NULL PRIMARY KEY IDENTITY(1, 1),
	Message NTEXT NOT NULL,
	TimeOfLastAction DATETIME NOT NULL
)
GO
 
CREATE TRIGGER tr_WorkHoursInsert
	ON WorkHours
	FOR INSERT AS
		INSERT INTO WorkHoursLogs (Message, TimeOfLastAction)
			VALUES ('Added row by a trigger', GETDATE())
GO

CREATE TRIGGER tr_WorkHoursDelete
	ON WorkHours
	FOR DELETE AS
		INSERT INTO WorkHoursLogs (Message, TimeOfLastAction)
			VALUES ('Deleted row by a trigger', GETDATE())
GO
 
CREATE TRIGGER  tr_WorkHoursUpdate
	ON WorkHours
	FOR UPDATE AS
		INSERT INTO WorkHoursLogs (Message, TimeOfLastAction)
			VALUES ('Updated row by a trigger', GETDATE())
GO